from django.urls import path,re_path
from ...views.admin import *

basePrefix = 'home/'
basePrefix2 = 'home/user/'

urlpatterns = [
    path('test',IndexViews.test),
    # 首页
    path('',IndexViews.login),
    # 登录页
    path('login',IndexViews.login,name="myhome_login"),
    path('login/doLogin',IndexViews.doLogin,name="myhome_doLogin"),
    # 注册页
    path('register',IndexViews.register,name="myhome_register"),
    path('register/doRegister',IndexViews.doRegister,name="myhome_doRegister"),
    # 退出登录
    path('doLogout',IndexViews.doLogout,name="myhome_doLogout"),
    path(basePrefix+'index',IndexViews.index,name="myhome_index"),
    path(basePrefix+'welcome', IndexViews.welcome,name="myhome_welcome"),
    # (2.用户管理
    path(basePrefix2+'user_list', UserViews.user_list,name="user_list"),
    path(basePrefix2+'doDeleteUser', UserViews.doDeleteUser,name="user_doDeleteUser"),
    path(basePrefix2+'doSearchUser', UserViews.doSearchUser,name="user_doSearchUser"),
    
    # # 404页面（/属于正则表达式的内容，而*属于非法字符），页面专用
    # re_path ('/', IndexViews.empty, name="myhome_empty"),
]
